package com.unsins.test.coherence;

/**
 * Created by IntelliJ IDEA.
 * User: odpsoft
 * Date: 2009-4-24
 * Time: 7:32:20
 */

import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;

public class CoherenceCache {
    NamedCache cache;

    public CoherenceCache() {
    }

    public void putCache() {
        cache = CacheFactory.getCache("VirtualCache");
        String key = "hello";
        cache.put(key, "Hello Cache");

    }

    public void retrieveCache() {

        System.out.println((String) cache.get("hello"));

    }

    public static void main(String[] args) {
        CoherenceCache cache = new CoherenceCache();
        cache.putCache();
        cache.retrieveCache();
    }
}

